The present invention relates to an apparatus and method for using a nibble (partial bits of word) inversion code; and, more particularly, to an apparatus and method for using a code with controlled transition for a data transmission and an interconnection in a network system.
The Manchester code, the code mark inversion(CMI) code and the 5B6B code were widely used as transmit line code in digital transmission systems. However, these codes are not suitable for very high speed communication systems since they require a baud rate twice as fast as the source bit rate, and it is difficult to develop transmission equipment to operate at such rates. Also these codes were not suitable for interconnection with Giga-bit rate since the codes are generated bit by bit.
In a transmission field of the communication, a scrambled NRZ(Non-Return-to-Zero) code is being widely used to solve such problems and maximize a code efficiency. This code has an effect of reducing a cross-talk and an interference by spreading the spectrum of data coded by randomizing probability of source data. But, the scrambled NRZ code only ensures zero probability of disparity, zero direct current(DC) frequency component and spread spectrum, in other words, the scrambled NRZ code does not perfectly guarantee them, and it does not provide a frame synchronous pattern and an in-band signaling words.
In a computer network, in order to solve such problems, the 8B10B code is invented in xe2x80x9cByte oriented DC balanced 8B10B partitioned block transmission codexe2x80x9d of U.S. Pat. No. 4,486,739 by P. A. Franaszek and A. X. Widmer. The 8B10B coder is performed on an octet basis. This code provides DC-balanced encoding, frame synchronous patterns and in-band signaling (or special) words.
However, though the 8B10B code has settled many problems caused in the above-mentioned codes, there is a problem that 8B10B coding scheme must be completely changed to encode a source data (for example 32 bit source data) other than 8 bit source data. Further, since 2 redundant bits are added to 8 bits constructing the byte of the source data to perform a coding, it is less efficient thus cause a problem that a transmission bandwidth becomes large.
W. A. Krzymein had proposed the xe2x80x9cPartially flipped mB(m+1)Bxe2x80x9d code in IEEE Trans. Commun., Vol. 37, No. 4, pp. 402-404 of xe2x80x9cTransmission performance analysis of a new class of line codes for optical fiber systemsxe2x80x9d in April 1989. In this code, a m+1 bit code word is produced by inserting a 1 redundancy bit into a source data character of an m bit. In this code, also, the coding is performed by using a disparity of a source data word as a code parameter and a running digital sum (RDS). In this code, a code efficiency is acceptable and its embodying is comparatively simple. But, there is a problem that a synchronous signal and in-band and ex-band signals can not be provided. There is further such a problem that a coding efficiency in a disparity, a digital sum variation (DSV) and a run length is low compared to a complicated extent of an embodying hardware.
At these days, Yeshik Shin and two others had disclosed a code in which the code efficiency is acceptable, an embodying thereof is simple, and its use is valid with 8bits and other words, in the U.S. Pat. No. 5,974,464 as xe2x80x9cSystem for high speed serial video Signal transmission using DC balanced codingxe2x80x9d in Oct. 26, 1999. In this prior art, however, there are some shortcoming that the number of transitions for the in-band signals(command) is small and the length of bits for the frame synchronous patterns is long.
It will be not explained in the following detailed description of the invention on account of a small relation to this technical field and limited space, but in a serial connection of a high-speed over a giga bit, a DC component of a line code does not become a serious problem, but a bandwidth based on the number of transitions and the code efficiency does rather become a problem. Further, when a serial bit stream is changed to a parallel in high speed, the number of parallel bits becomes over 8bits, thus there is a problem of requiring a code easily applicable to data having bits over 8bits.
Therefore, an object of the present invention is to provide an apparatus and method for using a nibble inversion code in which an inversion for partial bits (hereinafter, referred to as xe2x80x98nibblexe2x80x99) of the pre-code is decided by the number of transitions in a pre-code generated by adding a redundancy bit to source data, to provide high transition, in-band signaling and a block or a frame synchronization pattern.
In accordance with the present invention for achieving the objects, an apparatus for using a nibble inversion code to utilize a nibble inversion comprises first a transition number calculation unit for summing up the number of transitions for a pre-code generated by adding 1 redundancy bit to source data; an encoding type decoding unit for selecting a code type based on nibble inversion coding rules according to an in-band signaling and the transition number of the pre-codes generated from the first transition number calculating unit, and producing a control signal; and a bit manipulating unit for selecting a nibble inversion code type according to the control signal of the encoding type decoding unit, manipulating a bit and generating a code word.
In accordance with the present invention, another apparatus to receive a generated nibble inversion code word and decode source data includes; a transition number calculating unit for computing the number of transitions in the received code word; a decoding type decoding unit for generating a signal which selects a decoding type based on decoding rules of a nibble inversion code according to a nibble inversion representation bit provided within the code word, an in-band signaling or a special word SIG_OUT, and a code violation CODE_VIOLATION; and a bit manipulating unit for manipulating bits in the code word through a selection signal transferred from the decoding type decoding unit, and restoring original source data.
In a first method of the present invention, a method for using a nibble inversion code in a network system includes a first step of adding 1 redundancy bit to n bit source data and generating a pre-code, n being an even number of 2 or over; a second step of deciding the number of transitions in the generated pre-code; a third step of determining the pre-code as a code word if the number of transitions in the pre-code is greater than or equal to 1+n/2 in the result of the second step; a fourth step of inverting half bits (hereinafter, referred to as xe2x80x9cnibblexe2x80x9d) containing the redundancy bits among bits constructing the pre-code, and generating the code word, if the number of transitions in the pre-code is less than n/2 in the result of the second step; a fifth step of determining the pre-code as the code word in case that the number of transitions in the pre-code is equal to n/2 and simultaneously the source data is not an in-band signaling nor a special word in the deciding result of the second step; and a sixth step of inverting the nibble among the bits constructing the pre-code and generating the code word, in case that the number of transitions in the pre-code is equal to n/2 and simultaneously the source data is the in-band signaling or is the special word in the deciding result of the second step.
In a second method of the present invention, a method for using a nibble inversion code in a network system to receive a code word generated through a nibble inversion of n bit source data and to decode the source data, n being an even number of 2 or over includes a first step of confirming the number of transitions in the received code word; a second step of decoding the source data to bits except redundancy bits in the code word, if the number of transitions for the code word is greater than or equal to 1+n/2 and simultaneously the redundancy bit is not inverted in the confirming result of the first step; a third step of inverting a nibble constructing the code word and decoding the source data to the bits except the redundancy bits of the nibble inverted code word, if the number of transitions for the code word is greater than or equal to 1+n/2 and simultaneously the redundancy bit is inverted in the confirming result of the first step; a fourth step of decoding the source data to the bits except the redundancy bits of the code word if the number of transitions for the code word is equal to n/2 and simultaneously the redundancy bit is not inverted in the confirming result of the first step; a fifth step of inverting the nibble constructing the code word, decoding the source data to the bits except the redundancy bits of the nibble inverted code word, and representing that the decoded source data is an in-band signaling or a special word, if the number of transitions for the code word is equal to n/2 and simultaneously the redundancy bit is not inverted in the confirming result of the first step; and a sixth step of representing a signal violation if the number of transitions for the code word is smaller than n/2 in the confirming result of the first step.
In a third method of the present invention, a method for using a nibble inversion code in a network system contains a first step of adding 1 redundancy bit to n bit source data and generating a pre-code, n being an odd number of 3 or over; a second step of deciding the number of transitions in the generated pre-code; a third step of determining the pre-code as a code word if the number of transitions in the pre-code is greater than or equal to (n+1)/2 in the deciding result of the second step; a fourth step of inverting half bits (hereinafter, referred to as xe2x80x9cnibblexe2x80x9d) containing the redundancy bits among bits constructing the pre-code, and generating the code word, if the number of transitions in the pre-code is less than (nxe2x88x921)/2 in the deciding result of the second step; a fifth step of determining the pre-code as the code word in case that the number of transitions in the pre-code is equal to (nxe2x88x921)/2 and simultaneously the source data is not an in-band signaling and also is not a special word in the deciding result of the second step; and a sixth step of inverting the nibble among the bits constructing the pre-code and generating the code word, in case that the number of transitions in the pre-code is equal to (nxe2x88x921)/2 and simultaneously the source data is the in-band signaling or is the special word in the deciding result of the second step.
In a fourth method of the present invention, a method for using a nibble inversion code in a network system to receive a code word generated through a nibble inversion of n bit source data and to decode the source data, n being an odd number of 3 or over includes a first step of confirming the number of transitions in the received code word; a second step of decoding the source data to bits except redundancy bits in the code word, if the number of transitions in the code word is greater than or equal to (n+1)/2 and simultaneously the redundancy bit is not inverted in the confirming result of the first step; a third step of inverting a nibble constructing the code word and decoding the source data to the bits except the redundancy bits of the nibble inverted code word, if the number of transitions in the code word is greater than or equal to (n+3)/2 and simultaneously the redundancy bit is inverted in the confirming result of the first step; a fourth step of decoding the source data to the bits except the redundancy bits of the code word if the number of transitions in the code word is equal to (nxe2x88x921)/2 and simultaneously the redundancy bit is not inverted in the confirming result of the first step; a fifth step of inverting the nibble constructing the code word, decoding the source data to the bits except the redundancy bits of the nibble inverted code word, and representing that the decoded source data is an in-band signaling or a special word, if the number of transitions in the code word is equal to (n+1)/2 and simultaneously the redundancy bit is inverted in the confirming result of the first step; and a sixth step of representing a signal violation if the number of transitions in the code word is smaller than (nxe2x88x921)/2 in the confirming result of the first step.
The present invention provides a line code used in a data transmission and an interconnection system, and in this line code, a clock recovery is easy, only one redundancy bit is used in encoding, several frame synchronization code words are provided, plenty of in-band signals are provided, and a basis of code rules can be applied thereto as it is even though a source data word is constructed by bits beyond 8bits thus this line code is appropriate to an application of a serial connection with a speed over a giga bit.
In the inventive apparatus and method for using a nibble inversion code to settle the problems caused in the conventional techniques, a transition is ensured, only 1 bit is used as a redundancy bit in a line coding for an optional n bit source data, n being the number of bits for source data, several numbers of frame synchronization patterns are provided, the in-band signals are provided plentifully, a bit error on a line can be detected by a code violation detection, and it can be simply embodied by a hardware.
In the invention, it is provided a high-performance line code usable even in a transmission system over a giga bit speed and interconnection apparatus, and herein, a clock recovery is especially easy, a code efficiency and a transmission bandwidth are improved by using only one redundancy bit in encoding, a basis of the coding or decoding rules can be applied thereto as it is even though the source data is constructed by bits beyond 8bits, namely, 16 bits, or 32 bits or over, several numbers of frame synchronization code words are provided, and the in-band signals are provided abundantly.
In the inventive coding rule, a pre-code is generated by adding 1 redundancy bit for n bit source data, n being a natural number of 2 or over, and the number of transitions in a code word becomes plentiful by inverting a nibble of bits which construct the pre-code according to the number of transitions in the pre-code or by coding the pre-code as it is, and then the source data, an independent in-band signal and a block or a frame synchronization pattern are generated. The inventive decoding rules are a reverse of the coding rules.